package exam.business.service;

import java.util.List;

import exam.common.constant.ResultPort;
import exam.common.key.KeyQuestion;
import exam.model.dao.TQuestionDAO;
import exam.model.entity.TQuestionEntity;
import exam.system.business.AbstractService;
import exam.system.business.BusinessServiceInfo;

/**
 * <p>QuestionGetListService</p>
 * <br>
 * <p>Xu ly lay danh sach cau hoi</p>
 * 
 * @author Phong
 * @version 21/5/2012
 */

public class QuestionGetListService extends AbstractService {
	// tQuestionDAO
	private TQuestionDAO tQuestionDAO = new TQuestionDAO();
	@Override
	public String executeService(BusinessServiceInfo serviceInfo)
			throws Exception {
		// lay danh sach cau hoi
		List<TQuestionEntity> tQuestionEntityList = tQuestionDAO.selectListQuestion();
		// put danh sach cau hoi vao serviceInfo
		serviceInfo.put(KeyQuestion.T_QUESTION_ENTITY_LIST, tQuestionEntityList);
		return ResultPort.SUCCESS;
	}

}
